import time

def index(x,y):
    time.sleep(1)
    print('index函数打印：%s %s'%(x, y))

def home(name):
    time.sleep(1)
    print('welcome %s to home page' %name)
    return 123

def outter(func):
    def wrapper(*args,**kwargs): # 接收参数，整合
        start_time = time.time()
        res = func(*args,**kwargs)  # 打散
        stop_time = time.time()
        print(f'函数index运行时间为{stop_time-start_time}')
        return res
    return wrapper  # 返回


home = outter(home)
res = home('linhui')
print('res==》', res)

